procedure TFrmDlg.DBTMiddleFrameDirectPaint(Sender: TObject; dsurface: TDXTexture);
var
  d: TDXTexture;
  ax, ay: integer;
  rc: TRect;
begin
  with Sender as TDWindow do begin
    ax := SurfaceX(Left);
    ay := SurfaceY(Top);

    d := g_WMain99Images.Images[1616];   //
    if d <> nil then begin
      rc := d.ClientRect;
      rc.Bottom := Height - 20;
      dsurface.Draw(ax, ay + 10, rc, d, True);
    end;

    d := g_WMain99Images.Images[1618];  //
    if d <> nil then begin
      rc := d.ClientRect;      //ػ
      rc.Bottom := Height - 20;
      dsurface.Draw(ax + (Width - d.Width) + 2, ay + 10 , rc, d, True);
    end;

    d := g_WMain99Images.Images[1611];   //ϸ
    if d <> nil then begin
      rc := d.ClientRect;
      rc.Right := Width - 20;
      dsurface.Draw(ax + 10, ay + 1, rc, d, True);
    end;
    d := g_WMain99Images.Images[1614];   //¸
    if d <> nil then begin
      rc := d.ClientRect;
      rc.Right := Width - 20;
      dsurface.Draw(ax + 10, ay + (Height - d.Height), rc, d, True);
    end;

    d := g_WMain99Images.Images[1610];   //Ͻ
    if d <> nil then begin
      dsurface.Draw(ax, ay + 1, d.ClientRect, d, True);
    end;

    d := g_WMain99Images.Images[1612];   //Ͻ
    if d <> nil then begin
      dsurface.Draw(ax + (Width - d.Width) + 2, ay + 1, d.ClientRect, d, True);
    end;

    d := g_WMain99Images.Images[1613];   //½
    if d <> nil then begin
      dsurface.Draw(ax, ay + (Height - d.Height), d.ClientRect, d, True);

    end;

    d := g_WMain99Images.Images[1615];   //½
    if d <> nil then begin
      dsurface.Draw(ax + (Width - d.Width) + 4, ay + (Height - d.Height) + 1, d.ClientRect, d, True);
    end;

//    d := g_WMain99Images.Images[1617];   //м
//    if d <> nil then begin
//      rc := d.ClientRect;
//      rc.Right := Width - 30;
//      dsurface.Draw(ax + 8, ay + 31, rc, d, True);
//    end;

    //
    g_DXCanvas.FillRect(ax + 8, ay + 32, Width - 30, Height - 32 - 31, $FFFFFFFF);
  end;
end;